import React, { useState } from 'react';
import { AppstoreOutlined, MailOutlined, SettingOutlined, TaobaoOutlined, WechatOutlined } from '@ant-design/icons';
import { Menu } from 'antd';
const items = [
    {
        label: '首页',
        key: 'mail',
        icon: <TaobaoOutlined />,
    },
    {
        label: '个人中心',
        key: 'SubMenu',
        icon: <WechatOutlined />,
        children: [
            {
                label: '我的博客',
                key: 'app',
                icon: <AppstoreOutlined />,

            },
        ],
    },
    {
        key: 'alipay',
        label: (
            <a href="https://ant.design" target="_blank" rel="noopener noreferrer">
                Navigation Four - Link
            </a>
        ),
    },
];
const MyMenu = () => {
    const [current, setCurrent] = useState('mail');
    const onClick = e => {
        console.log('click ', e);
        setCurrent(e.key);
    };
    return <Menu onClick={onClick} selectedKeys={[current]} mode="horizontal" items={items} />;
};
export default MyMenu;